/**
 * 
 */
package br.com.rafael.gestorinvestimentos.util;

import javax.swing.text.MaskFormatter;

/**
 * @author Rafael Sperendio
 *
 */
public class MaskEditor{
    
	public static MaskFormatter Mask(String mask, char placeHolder){	  
	    MaskFormatter maskFormatter = new MaskFormatter();
		
	    try{  
			maskFormatter.setMask(mask); //Atribui a mascara  
			maskFormatter.setPlaceholderCharacter(placeHolder); //Caracter para preencimento   
	    }  
	    catch (Exception excecao) {  
	    	excecao.printStackTrace();  
	    }   
	    
	    return maskFormatter;
	}
}
